/*
    vega
    Copyright (c) Vlad Dimitriu

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef SELF_H
#define SELF_H

enum log_level { INFO, WARN, ERROR, DEBUG };

struct self {
	char *path;
	struct log {
		char *name;
		FILE *file;
		enum log_level level;
	} log;
	char *ip;
	char *port;
	char buffer[4096];
};

extern struct self s;

extern void v_log(enum log_level level, char const *form, ...);
extern void init_self(int argc, char **argv);
#endif
